package com.yjd.comm.repayment.service;

import com.yjd.comm.base.enums.DbWREnums;
import com.yjd.comm.base.service.IBaseService;
import com.yjd.comm.repayment.model.RepaymentClearModel;

import java.util.List;
import java.util.Map;

/**
 * <b>description</b>：还款(vip商户)清算表业务接口<br>
 * <b>time</b>：2017-10-19 15:51:31 <br>
 * <b>author</b>：  carl
 */
public interface IRepaymentClearService extends IBaseService {
	/**
	 * 插入
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public RepaymentClearModel insert(RepaymentClearModel model) throws Exception;

	/**
	 * 更新,大于等于1表示成功，其他失败
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public int update(RepaymentClearModel model) throws Exception;

	/**
	 * 根据id删除,大于等于1表示成功，其他失败
	 * 
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public int delete(long id) throws Exception;

	/**
	 * 查询VIP订单还款详情
	 *
	 * @param paramMap 查询参数列表
	 * @param write 是否是操作主库
	 * @return 返回结果列表
	 * @throws Exception
	 */
	public List queryRepaymentInfo(Map<String, Object> paramMap, DbWREnums write) throws Exception;

	/**
	 *  统计某个时间段内 B模式还款金额
	 * @param startTime
	 * @param endTime
	 * @return
	 * @throws Exception
	 */
	public Double querySumRepaymentPrice(Long startTime,Long endTime)throws Exception;

	/**
	 * 统计某个时间段内 平台分成利润
	 * @param startTime
	 * @param endTime
	 * @return
	 * @throws Exception
	 */
	public Double querySumPfProfit(Long startTime,Long endTime)throws Exception;


}
